The Internet controls routing of packets based on IP addresses. Specifically, a unique IP address (which is generally called a global IP address) is assigned to each of terminals connected to the Internet, whereby a destination of a packet can be identified.
However, as the Internet becomes widespread, the risk of starvation of the global IP addresses to be assigned to terminals is raised. Accordingly, generally practiced is a method involving, in a closed environment in a sole organization, using an IP address (which is generally called a private IP address) that works merely within that organization, and assigning a proper global IP address only when the Internet is to be accessed.
If a terminal having a private IP address attempts to access the Internet, processing of converting its private IP address into a global IP address is required. Mechanisms for achieving such processing have been proposed, including a technique such as a proxy or a NAT (Network Address Translator), so that each terminal can be connect to the Internet via the proxy or NAT.
In such a case, however, there arises a problem that a P2P (peer-to-peer) application such as chatting cannot be used via the Internet between terminals having private IP addresses. This is because, although a global IP address must be specified as a destination address to deliver a packet to the destination via the Internet as described above, a terminal that should serve as the destination is merely assigned with a private IP address when the NAT is installed.
To solve such a problem, a scheme for relaying/transferring packets using a relay server has been proposed in Patent Document 1.
A relay server in Patent Document 1 accepts a connection from terminals having private IP addresses such that the terminals can use a P2P application. It then receives a packet from the terminal serving as a sender, and transfers the received packet to the terminal serving as a destination. The terminals can thus exchange the packets by indirectly exchanging packets through the intermediary of the relay server even if the terminals are not assigned with global IP addresses.
FIG. 1 shows the system as disclosed in Patent Document 1, and FIG. 2 shows a procedure to establish a connection as disclosed in Patent Document 1. The connection processing will now be described with reference to FIG. 2.
When a terminal 1 desires to start communicate with a terminal 7, the terminal 1 first transmits a start-connection mail, which is destined for the terminal 7 for notifying starting of connection, to a mail server 5.
The terminal 7 periodically (e.g., every thirty seconds) checks the mail server 5 as to whether the start-connection mail has arrived.
If the start-connection mail has arrived at the mail server 5, the terminal 7 receives the start-connection mail.
On receipt of the start-connection mail, the terminal 7 establishes an HTTP (Hyper Text Transfer Protocol) connection with a relay server 4 that is connected to the Internet.
Once the terminal 7 has established the HTTP connection, it receives an authentication URL from the relay server 4 and transmits a connection-completed mail, which is destined for the terminal 1 for notifying completion of the HTTP connection, to the mail server 5. The connection-completed mail contains the authentication URL.
The terminal 1 periodically (e.g., every thirty seconds) checks the mail server 5 as to whether the connection-completed mail has arrived.
If the connection-completed mail has arrived at the mail server, the terminal 1 receives the connection-completed mail.
On receipt of the connection-completed mail, the terminal 1 establishes an HTTP connection with the relay server 4 based on the authentication URL contained in the connection-completed mail. Once the HTTP connection has been established, the terminal 1 transmits a user ID and a password to the relay server 4 for authentication processing.
After completion of the authentication processing, the relay server 4 conducts relay-transfer of packets to enable communication between the terminals 1, 7. Specifically, the relay server 4 transfers to the terminal 7 a packet transmitted from the terminal 1, and also transfers to the terminal 1 a packet transmitted from the terminal 7.
The terminals 1, 7 can thus exchange packets by indirectly exchanging the packets through the intermediary of the relay server 4 even if the terminals 1, 7 are not assigned with global IP addresses.
[Patent Document 1] Japanese Patent Application Laid Open No. 2005-316529